.class public Lcom/xingbook/paint/view/e;
.super Ljava/lang/Object;


# instance fields
.field final synthetic a:Lcom/xingbook/paint/view/PaintView;

.field private b:I

.field private c:Lcom/xingbook/paint/view/PaintView;

.field private d:Ljava/util/ArrayList;

.field private e:Ljava/util/ArrayList;

.field private f:Ljava/util/ArrayList;


# direct methods
.method public constructor <init>(Lcom/xingbook/paint/view/PaintView;Lcom/xingbook/paint/view/PaintView;I)V
    .locals 1

    iput-object p1, p0, Lcom/xingbook/paint/view/e;->a:Lcom/xingbook/paint/view/PaintView;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    iput v0, p0, Lcom/xingbook/paint/view/e;->b:I

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/xingbook/paint/view/e;->f:Ljava/util/ArrayList;

    iput-object p2, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    iput p3, p0, Lcom/xingbook/paint/view/e;->b:I

    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->f:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    return-void
.end method

.method public a(Lcom/xingbook/paint/a/a/a;)V
    .locals 3

    const/4 v2, 0x0

    if-eqz p1, :cond_1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    iget v1, p0, Lcom/xingbook/paint/view/e;->b:I

    if-ne v0, v1, :cond_0

    iget v0, p0, Lcom/xingbook/paint/view/e;->b:I

    if-lez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/paint/a/a/a;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->f:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    :cond_0
    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_1
    return-void
.end method

.method public b()V
    .locals 3

    invoke-virtual {p0}, Lcom/xingbook/paint/view/e;->d()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/paint/a/a/a;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->a:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v0}, Lcom/xingbook/paint/view/PaintView;->a(Lcom/xingbook/paint/view/PaintView;)Landroid/graphics/Bitmap;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v1}, Lcom/xingbook/paint/view/PaintView;->a(Lcom/xingbook/paint/view/PaintView;)Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/xingbook/paint/view/PaintView;->setTempForeBitmap(Landroid/graphics/Bitmap;)V

    :goto_0
    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v0}, Lcom/xingbook/paint/view/PaintView;->d(Lcom/xingbook/paint/view/PaintView;)Landroid/graphics/Canvas;

    move-result-object v1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->f:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_2
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-virtual {v0}, Lcom/xingbook/paint/view/PaintView;->invalidate()V

    :cond_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v1}, Lcom/xingbook/paint/view/PaintView;->b(Lcom/xingbook/paint/view/PaintView;)I

    move-result v1

    iget-object v2, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v2}, Lcom/xingbook/paint/view/PaintView;->c(Lcom/xingbook/paint/view/PaintView;)I

    move-result v2

    invoke-static {v0, v1, v2}, Lcom/xingbook/paint/view/PaintView;->a(Lcom/xingbook/paint/view/PaintView;II)V

    goto :goto_0

    :cond_2
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/paint/a/a/a;

    invoke-interface {v0, v1}, Lcom/xingbook/paint/a/a/a;->a(Landroid/graphics/Canvas;)V

    goto :goto_1

    :cond_3
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/paint/a/a/a;

    invoke-interface {v0, v1}, Lcom/xingbook/paint/a/a/a;->a(Landroid/graphics/Canvas;)V

    goto :goto_2
.end method

.method public c()V
    .locals 3

    invoke-virtual {p0}, Lcom/xingbook/paint/view/e;->e()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/paint/a/a/a;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->a:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v0}, Lcom/xingbook/paint/view/PaintView;->a(Lcom/xingbook/paint/view/PaintView;)Landroid/graphics/Bitmap;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v1}, Lcom/xingbook/paint/view/PaintView;->a(Lcom/xingbook/paint/view/PaintView;)Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/xingbook/paint/view/PaintView;->setTempForeBitmap(Landroid/graphics/Bitmap;)V

    :goto_0
    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v0}, Lcom/xingbook/paint/view/PaintView;->d(Lcom/xingbook/paint/view/PaintView;)Landroid/graphics/Canvas;

    move-result-object v1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->f:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_2
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-virtual {v0}, Lcom/xingbook/paint/view/PaintView;->invalidate()V

    :cond_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    iget-object v1, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v1}, Lcom/xingbook/paint/view/PaintView;->b(Lcom/xingbook/paint/view/PaintView;)I

    move-result v1

    iget-object v2, p0, Lcom/xingbook/paint/view/e;->c:Lcom/xingbook/paint/view/PaintView;

    invoke-static {v2}, Lcom/xingbook/paint/view/PaintView;->c(Lcom/xingbook/paint/view/PaintView;)I

    move-result v2

    invoke-static {v0, v1, v2}, Lcom/xingbook/paint/view/PaintView;->a(Lcom/xingbook/paint/view/PaintView;II)V

    goto :goto_0

    :cond_2
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/paint/a/a/a;

    invoke-interface {v0, v1}, Lcom/xingbook/paint/a/a/a;->a(Landroid/graphics/Canvas;)V

    goto :goto_1

    :cond_3
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/paint/a/a/a;

    invoke-interface {v0, v1}, Lcom/xingbook/paint/a/a/a;->a(Landroid/graphics/Canvas;)V

    goto :goto_2
.end method

.method public d()Z
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public e()Z
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public f()V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/view/e;->e:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "canUndo"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/xingbook/paint/view/e;->d()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
